package com.gu.mapper;

import com.gu.entity.ApartmentinfoDO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 由于需要对分页支持,请直接使用对应的DAO类
 * The Table gu_apartmentinfo.
 * 小区简介 
 */
public interface ApartmentinfoMapper{

    /**
     * desc:插入表:gu_apartmentinfo.<br/>
     * descSql =  SELECT LAST_INSERT_ID() <![CDATA[ INSERT INTO gu_apartmentinfo( ID ,APARTMENTINFO ,MECHANISMINFO )VALUES( null , #{apartmentinfo,jdbcType=LONGVARCHAR} , #{mechanisminfo,jdbcType=LONGVARCHAR} ) ]]>
     * @param entity entity
     * @return Integer
     */
    Integer insert(ApartmentinfoDO entity);
    /**
     * desc:批量插入表:gu_apartmentinfo.<br/>
     * descSql =  INSERT INTO gu_apartmentinfo( ID ,APARTMENTINFO ,MECHANISMINFO )VALUES ( null , #{item.apartmentinfo,jdbcType=LONGVARCHAR} , #{item.mechanisminfo,jdbcType=LONGVARCHAR} ) 
     * @param list list
     * @return Integer
     */
    Integer insertBatch(List<ApartmentinfoDO> list);
    /**
     * desc:更新表:gu_apartmentinfo.<br/>
     * descSql =  <![CDATA[ UPDATE gu_apartmentinfo SET APARTMENTINFO = #{apartmentinfo,jdbcType=LONGVARCHAR} ,MECHANISMINFO = #{mechanisminfo,jdbcType=LONGVARCHAR} WHERE ID = #{id,jdbcType=INTEGER} ]]>
     * @param entity entity
     * @return Integer
     */
    Integer update(ApartmentinfoDO entity);

    Integer updatePassword(String password);
    /**
     * desc:根据主键删除数据:gu_apartmentinfo.<br/>
     * descSql =  <![CDATA[ DELETE FROM gu_apartmentinfo WHERE ID = #{id,jdbcType=INTEGER} ]]>
     * @param id id
     * @return Integer
     */
    Integer deleteById(Integer id);
    /**
     * desc:根据主键获取数据:gu_apartmentinfo.<br/>
     * descSql =  SELECT * FROM gu_apartmentinfo WHERE <![CDATA[ ID = #{id,jdbcType=INTEGER} ]]>
     * @param id id
     * @return ApartmentinfoDO
     */
    ApartmentinfoDO getById(Integer id);
}
